NAVIÉ

Scripting

Node Params Scripting Constraints
Scripting

Open Editor




Opens the standard C4D COFFEE Expression Editor.

Compile




Compiles (parses the code and checks for its validity) the script code.

Script Code





Here you can write the COFFEE script that creates the acceleration force.
Once assigned to the particle group Forces list, it will call the given script code for each particle in that group.

There are predefined Effex variables that you can access beside the usual COFFEE functionality or that offer you information about the current particle and its content.

main(op) - op is the COFFEE force itself (the correct object pointer is passed here during rendering...so you can extract the render basedocument from it)
intensity - the node's "Intensity" float slider value
particle_pos - the physical position vector of the particle
particle_acceleration - the current acceleration vector of the particle
particle_index - the particle index in the particle group


By default the script code generates a simple drag force.

User Defined Variables





This list takes nodes of type "Value".
Once you assigned a Value node, the script code automatically creates a new variable which is named equal to the Value node's name.

Example:
The Value node's name is "brains", then you can automatically access the variable "brains" in the script which allows to access the Value node value.

Therefore you can create an arbitrary amount of new float, integer or vector variables and control them from within the Value node's settings.